package com.qijian.maindata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qijian.maindata.domain.ProjectProductionPlan;
import com.qijian.maindata.domain.query.GanttQuery;
import com.qijian.maindata.domain.vo.GanttBOMDetail;
import com.qijian.maindata.domain.vo.ProcessOrderTypeVo;
import com.qijian.maindata.domain.vo.ProjectGantt;
import com.qijian.maindata.domain.vo.ProjectProcessTypeVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 项目计划Mapper接口
 */
public interface ProjectProductionPlanMapper extends BaseMapper<ProjectProductionPlan> {

    /***
     * 根据projectId获取项目计划的每个工序的 开始 结束 时间
     * @param projectId
     * @return
     */
    List<ProjectProcessTypeVo> getProcessTypeTimeByProjectId(Long projectId);

    /***
     * 根据项目号获取所有计划
     * @param projectNo
     * @return
     */
    List<ProjectProductionPlan> getAllList(String projectNo);

    List<ProcessOrderTypeVo> getAllProcessOrderByProjectId(@Param("ids") List<Long> ids);

    List<ProcessOrderTypeVo> getAllProcessOrderByProjectIdForTest(@Param("ids") List<Long> ids);

    List<GanttBOMDetail> gantt4BomDetails(@Param("projectId") Long projectId);

    List<ProjectGantt> getGanttProjects(@Param("query") GanttQuery ganttQuery);

    List<GanttBOMDetail> gantt4BomDetailsViaProjects(@Param("projectIds") List<Long> projectIds);
}
